package dao.impl.jpa;

import java.util.List;

import dao.LandDAO;
import domain.Land;

public class LandDAOImpl extends BasePersistence implements LandDAO {

	@SuppressWarnings("unchecked")
	@Override
	public List<Land> findAll() {
        open();
        List<Land> set = em.createNamedQuery("Land.findAll").getResultList();
        close();
		return set;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Land> getLanden(int continent_id) {
        open();
        List<Land> set = em.createNamedQuery("Land.findByContinentId").setParameter("continent_id", continent_id).getResultList();
        close();
		return set;
	}
}